package org.dxy.types.id;

import cn.hutool.core.lang.Snowflake;
import cn.hutool.core.util.IdUtil;

/**
 * @description:
 * @author: dxy
 * @createTime: 2025/6/21 22:47
 */
public class HutoolSnowflakeGenerator {
    // datacenterId 和 workerId 可配置，例如从配置文件中读取
    private static final Snowflake snowflake = IdUtil.getSnowflake(1, 1);

    public static long generateId() {
        return snowflake.nextId();
    }
}
